<template>
  <a-button
    class="default-button"
    :type="btnType"
    :size="btnSize"
    :loading="loading"
    @click="btnConfirm"
    :disabled="btnDisabled"
  >
    {{ btnText }}
  </a-button>
</template>
 
<script>
export default {
  props: [
    "btnText",
    "btnType",
    "btnPowerNum",
    "btnParameter",
    "btnSize",
    "btnDisabled",
    "loading",
  ],
  data() {
    return {};
  },
  methods: {
    btnConfirm() {
      if (!this.hasPermission(this.btnPowerNum)) {
        return;
      }
      this.$emit("operation", this.btnParameter);
    },
  },
};
</script>
 
<style lang = "less" scoped>
</style>